package com.entity;


//Object
public class Person extends Animal {


    public Person() {
        //子类构造函数执行之前优先调用父类的构造方法
//        super();
        super();
//        this("zhangsan", 20);
        System.out.println("Person....");
    }


    public Person(String name, int age) {
//        super();
        this.name = name;
        this.age = age;
        System.out.println("Person 2....");
    }

    public Person(String name, int age, String address) {
        this.name = name;
        this.age = age;
        this.address = address;
    }


    private String name;
    private int age;
    private String address;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        //this用来区分同名的成员变量和局部变量
        //方法使用变量遵循就近原则
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public void move() {
        System.out.println("人类直立行走");
    }

    @Override
    public void hunt() {
        System.out.println("人类制造和使用各种捕猎工具");
    }

    public void study() {
        super.hunt();
        super.move();

        this.move();
        this.hunt();
    }
}
